
#include <jni.h>

#ifdef __cplusplus
extern "C" {
#endif

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createDiscreteDynamicsWorldNative(
		JNIEnv* env,
		jobject owner,
		jobject gravityVector);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_setRigidBodyOrientationNative(
		JNIEnv* env,
		jobject owner,
		jint bodyAddress,
		jfloatArray glOrientMatrix);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createRigidBodyNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint shapeAddress,
		jfloatArray glOrientMatrix,
		jfloat mass,
		jint collisionGroup,
		jint collisionMask,
		jboolean useDefaultMasks);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createPoint2PointConstraintNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint bodyAddress,
		jobject pivotVector);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createPoint2PointConstraint2BodiesNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint body1Address,
		jint body2Address,
		jobject pivot1Vector,
		jobject pivot2Vector);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createSliderConstraint2BodiesNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint body1Address,
		jint body2Address,
		jfloatArray transformsMatrix);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createSliderConstraintNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint body1Address,
		jfloatArray transformMatrix1,
		jfloat lowerLinearLimit,
		jfloat upperLinearLimit);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createHingeConstraintNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint bodyAddress,
		jobject pivotVector,
		jobject axisVector);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createBoxCollisionShapeNative(
		JNIEnv* env,
		jobject owner,
		jfloat xSize, jfloat ySize, jfloat zSize);


JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_createSphereCollisionShapeNative(
		JNIEnv* env,
		jobject owner,
		jfloat radius);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_applyCentralImpulseNative(
		JNIEnv* env,
		jobject owner,
		jint bodyAddress,
		jfloat vectorX,
		jfloat vectorY,
		jfloat vectorZ);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_destroyDiscreteDynamicsWorldNative(JNIEnv* env,
																			   	     jobject owner,
																			   	     jint worldDataAddress);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_destroyRigidBodyNative(JNIEnv* env,
																		 jobject owner,
																		 jint worldAddress,
																		 jint rigidBodyAddress);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_destroyCollisionShapeNative(JNIEnv* env,
																			  jobject owner,
																			  jint collisionShapeAddress);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_destroyConstraintNative(JNIEnv* env,
																   jobject owner,
																   jint worldAddress,
																   jint constraintAddress);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_doSimulationNative(JNIEnv* env,
															   	     jobject owner,
															   	     jint worldDataAddress,
															   	     jfloat timeStep,
															   	     jint maxSubSteps);

JNIEXPORT
jboolean
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_pushBodyNative(
		JNIEnv* env,
		jobject owner,
		jint worldAddress,
		jint bodyAddress,
		jfloat dirX,
		jfloat dirY,
		jfloat dirZ,
		jfloat force);

JNIEXPORT
jint
JNICALL
Java_se_lnu_axez_physics_bullet_BulletFacade_pickBodyNative(JNIEnv* env,
																	 jobject owner,
																	 jint worldAddress,
																	 jfloatArray rayCoord,
																	 jint nearOffset,
																	 jint farOffset);

#ifdef __cplusplus
}
#endif
